﻿using MiniFox.Components;
using MiniFox.Configurations;
using MiniFox.Platform.File.Configurations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniFox.Platform.File.Providers
{
    /// <summary>
    /// 
    /// </summary>
    [AutoRegister, SpareComponent(typeof(FileSystemConfigurationProvider))]
    public interface IFileSystemConfigurationProvider
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        FileManageConfiguration GetConfiguration();
    }
    /// <summary>
    /// 
    /// </summary>
    internal sealed class FileSystemConfigurationProvider : IFileSystemConfigurationProvider
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public FileManageConfiguration GetConfiguration()
        {
            return ConfigurationFactory.GetConfig<FileManageConfiguration>();
        }
    }
}
